home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 October / EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso / Aminet / comm / fido / ASTG18.lha / ASTG18 / ASTG.Doc < prev    next >
Text File  |  1995-04-14  |  20KB  |  527 lines

  1. NOTE: This file is accompanied by an icon that contains "folding"
  2. information used by TurboText.  If you use TurboText as a text
  3. reader, you will see this file collapsed, and you can expand the
  4. sections you are interested in.
  5.  
  6. Asha's Silly Tagline Generator 1.8 Documentation
  7. ================================================
  8.  
  9. About ASTG
  10. ~~~~~~~~~~
  11.  
  12.    ASTG is a tagline generator.  For those people not familiar
  13.    with such things, a tagline generator's function is to create
  14.    random quotes that appear at the end of a message, maybe
  15.    humorous, maybe not.  Taglines are more or less bumper stickers
  16.    for electronic mail.
  17.  
  18.    ASTG 1.0 (and later revisions) was created specifically for
  19.    Asha Develder as a birthday present.  While I could spend a
  20.    few pages describing Asha and why she has inspired me to write
  21.    a program just for her, I think she speaks best for herself,
  22.    so catch her in the Fidonet echos, AMIGA (sometimes called
  23.    Amiga General) and the echo she moderates, AMIGAGAMES.  To
  24.    know her is to love her. :-)
  25.  
  26.    Anyway, Happy Birthday, Asha!!!
  27.  
  28.    ASTG was designed to work with most popular offline readers
  29.    and point programs, such as Spot, April, or Foozle. It may
  30.    well work with other programs but I have not had the
  31.    opportunity to try them with it.  If you get ASTG to work with
  32.    one of these other programs, please contact me and let me know
  33.    how you did it, and I'll include that information in any
  34.    future releases (if any) of the program's docs.
  35.  
  36. History of ASTG
  37. ===============
  38.  
  39.    ASTG began its life as an Arexx script that was released as
  40.    ASTG07.LHA (sysops, if you have this one, you may delete it).
  41.    While it worked fine for me, it was a bit slow on the larger
  42.    tagline files.  Asha especially disliked having to wait for
  43.    Arexx to makes its way through the large collection of
  44.    taglines she had, hence my motivation to speed things up for
  45.    her.
  46.  
  47.    ASTG the Rexx script was developed partly from QUOTEMONGER,
  48.    another Arexx tagline generator.  Well, two or three lines of
  49.    the original code remained after I hacked it :-)
  50.  
  51.    ASTG 0.7 seems to have developed a reputation for being
  52.    psychic. I make NO claims of ownership for this -- the source
  53.    code for 0.7 is available and I can find nothing in it
  54.    representing an AI function, and no one has pointed that block
  55.    of code out to me, either. It SEEMS that that certain
  56.    *something* has carried over to the C version, too.  One thing
  57.    we have noticed is that it takes a while for ASTG to get
  58.    "used" to you before things start happening.
  59.  
  60. FEATURES
  61. ========
  62.  
  63.    ASTG offers several features that might not be individually
  64.    unique, but as a whole it offers a comprehensive package:
  65.  
  66.    o  Marks taglines as they are used. This ensures that you
  67.       cycle through ALL your taglines before it starts over,
  68.       which means basically that you get to see them all over
  69.       the course of time.  Typical C and Arexx randomizing
  70.       functions -- aren't, so they don't normally provide much
  71.       variety in taglines.
  72.  
  73.    o  Allows taglines of over one line in length. The taglines
  74.       have to be formatted in a specific way for this to work
  75.       (read on).
  76.  
  77.    o  Intuition based Prefs editor. Easy to set up!
  78.  
  79.    o  Works with most text editors
  80.  
  81.    o  Works with any message system that calls an external editor
  82.       and stores the message in an external text file.
  83.  
  84.    o  FAST! Written in C for speed!
  85.  
  86. Requirements
  87. ============
  88.  
  89.    ASTG 1.7 requires AmigaDOS 2.04 or later. ReqTools.library
  90.    version 38 or later is required for the prefs program. It also
  91.    requires a message writing system of some sort and a file of
  92.    taglines  (sample  tagline  file  included, but PLEASE start
  93.    your own personalized collection! Otherwise, the magic will not
  94.    work!).
  95.  
  96. Installation
  97. ============
  98.  
  99. If you have been using ASTG 1.0 through 1.4, you will have to
  100. delete ENV:ASTG.PREFS and re-run ASTG Prefs!  Sorry about that,
  101. but there was a problem in the way I was reading the prefs file,
  102. and the easiest way to correct it was to completely change the
  103. way I did things.
  104.  
  105.    ASTG Archive
  106.    ~~~~~~~~~~~~
  107.  
  108.    From the ASTG archive, copy the following files:
  109.  
  110.       ASTG Prefs        Copy this file and its icon to your
  111.       ASTG Prefs.info   SYS:Prefs directory.  Actually, it can go
  112.                         anywhere, but the PREFS dir is the
  113.                         logical place to put it.
  114.  
  115.       ASTG              Copy this program to where you plan to
  116.                         use it -- C: is fine, as is where you
  117.                         keep your mail reader.  As long as you
  118.                         can find it later...
  119.  
  120.       Taglines          This is a sample tagline file.  Put it
  121.                         wherever you like, but be sure to
  122.                         remember where it went, as you'll
  123.                         probably wish to edit it later on.  You
  124.                         can also rename it to anything you wish.
  125.  
  126.       ASTG.DOC          Put this file anywhere you wish :-)
  127.  
  128.    Your Mail Program
  129.    ~~~~~~~~~~~~~~~~~
  130.  
  131.       SPOT
  132.       ~~~~
  133.  
  134.          In the SETTINGS menu, select GENERAL.  On the setup
  135.          window you get, set EDITOR to:
  136.  
  137.             <path>/ASTG %s
  138.  
  139.          where <path> is the drive and path that ASTG is stored
  140.          in.
  141.  
  142.       APRIL
  143.       ~~~~~
  144.          In the CONFIGS menu, select GENERAL1. On the setup
  145.          window you get, set EDITOR to:
  146.  
  147.             <path>/ASTG
  148.  
  149.          where <path> is the drive and path that ASTG is stored
  150.          in.
  151.  
  152.       FOOZLE
  153.       ~~~~~~
  154.          Run FZI.  Click on GENERAL1. Cycle through until you
  155.          find the "Editor" window. Set it to
  156.  
  157.            <path>/ASTG %
  158.  
  159.          where <path> is the drive and path that ASTG is stored
  160.          in.
  161.  
  162.    Configuring ASTG Prefs
  163.    ======================
  164.  
  165.       Double click on the ASTG Prefs icon.  A window will pop up
  166.       with four parameters that you can set:
  167.  
  168.       Tag File       This is the path and filename of the tagline
  169.                      file. Click on the button next to it to get
  170.                      a file requester.
  171.  
  172.       Editor 1       This is the path and filename of the editor
  173.                      you use to write messages, and the first
  174.                      part of any parameters you need to pass it,
  175.                      up to but not including the filename that
  176.                      you will be editing. Click on the button
  177.                      next to it to get a file requester.
  178.  
  179.                      For example, if you're using TurboText, you
  180.                      might set it to TurboText:TTX.  The next
  181.                      thing you would NORMALLY put in that line
  182.                      would be the file name itself.  ASTG gets
  183.                      that from the mail program itself, so don't
  184.                      put it in here.
  185.  
  186.       Editor 2       Some editors require parameters AFTER the
  187.                      file name. This is where you would put it.
  188.                      If there is nothing you need to put there,
  189.                      make it blank.
  190.  
  191.                      For example, Turbotext will let the parent
  192.                      process go immediately after it is called,
  193.                      normally, but you can make it wait until you
  194.                      finish editing the message with the WAIT
  195.                      parameter.  Another example would be the
  196.                      CygnusEd -keepio parameter.
  197.  
  198.       Brag Line      ASTG normally lets the world know that
  199.                      you're using it.  If this checkbox is turned
  200.                      off, it won't.  It won't bruise my ego if
  201.                      you want to be incognito :-)  If I was
  202.                      worried about it, I wouldn't have made it an
  203.                      OPTION. :-)  Also, for the bandwidth-concious,
  204.                      you'll probably want to turn this off in order
  205.                      to save precious bytes in your outgoing mail
  206.                      packets (no comment :-)
  207.  
  208.    Creating and editing the tagline file
  209.    =====================================
  210.  
  211.       NOTE: if you have been using ASTG 0.7, you DO NOT need to
  212.       change your tagline file except to delete the "###" at the
  213.       end.
  214.  
  215.  
  216. IMPORTANT >>>>>>>>>
  217.  
  218.       The tagline file can contain as many taglines as you wish.
  219.       The ONLY constraint is how much memory you have -- be
  220.       warned that ASTG loads the ENTIRE tagline into memory, so
  221.       if you have a 500K tagline file wow!) you need to have at
  222.       least 500K of memory free to use it.
  223.  
  224. END IMPORTANT >>>>>
  225.  
  226.       Each line in the tagline file represents one single
  227.       tagline.
  228.  
  229.       Each tagline, as I mentioned, can be a multi-line tagline.
  230.       To do this, seperate each 'line' in the tagline with the
  231.       two characters, "\n".  You will notice several taglines in
  232.       the sample file are formatted like this.
  233.  
  234.       For example:
  235.  
  236.       ... Tell a man that there are 300 billion stars in the galaxy and\n    he'll believe you. Tell him a bench has wet paint and he'll have\n    to touch it to be sure. -- M.B.
  237.  
  238.       (if your text reader doesn't let you see it properly, the
  239.       above should have been seen all on one line).
  240.  
  241.       translates to:
  242.  
  243.       ... Tell a man that there are 300 billion stars in the galaxy and
  244.           he'll believe you. Tell him a bench has wet paint and he'll have
  245.           to touch it to be sure. -- M.B.
  246.  
  247.       NOTE:
  248.  
  249.             EXCESSIVE USE OF THIS FUNCTION MAY RESULT IN YOUR
  250.             BEING FLAMED BY OTHER PEOPLE ON THE NET FOR WASTING
  251.             BANDWIDTH. IF THIS HAPPENS, IT'S YOUR FAULT. I SUPPLY
  252.             THE PROGRAM, WHAT YOU DO WITH IT ISN'T MY FAULT.
  253.  
  254.    General information:  (for the technically minded)
  255.    ====================
  256.  
  257.       So far, I've presented several specific examples. Now, I'll
  258.       go more into depth with this so that people with different
  259.       programs can possibly make it work.  If you do, please let
  260.       me know and I'll include your information in any future
  261.       releases.
  262.  
  263.       ASTG Command Line
  264.       ~~~~~~~~~~~~~~~~~
  265.  
  266.       Usage: ASTG <Message File>
  267.  
  268.          ASTG takes most of its parameters from ENV:ASTG.PREFS.
  269.          One filename, the name of the message file itself, must
  270.          be supplied by the mail program.  This file must be a
  271.          plain text file.
  272.  
  273.       ASTG Operation
  274.       ~~~~~~~~~~~~~~
  275.          ASTG does several things as it goes along.  First, it
  276.          opens the tagline file that it is directed to in the
  277.          prefs file, counts up the number of unused taglines, and
  278.          randomly selects one to use.  It marks that tagline with
  279.          a "*" as the first character, then re-writes to the
  280.          tagline file with the changed information.
  281.  
  282.          It then parses and appends that tagline to the end of
  283.          the message.  If it is directed to, it appends a
  284.          bragline.
  285.  
  286.          Finally, it calls the prefs-selected text editor, using
  287.          the name of the message file supplied on the command
  288.          line by the calling message reader.
  289.  
  290.          In your mail program, there is probably a place that you
  291.          tell it what editor to use.  If there is not, you
  292.          probably cannot use ASTG with it.  In that program, you
  293.          substitute ASTG for the editor.  Be sure to follow that
  294.          program's conventions for supplying the message file
  295.          name.
  296.  
  297.          If there are less than 3 free taglines, ASTG will remove
  298.          the markers before writing the taglines back to the
  299.          file.  This takes a bit of time, but it only happens
  300.          occasionally.
  301.  
  302.       ASTG.Prefs
  303.       ~~~~~~~~~~
  304.          ASTG uses the style guide suggested method of storing its
  305.          configuration data in ENV: and ENVARC: as ASTG.PREFS.
  306.          You should not change this manually.
  307.  
  308. TECHNICAL SUPPORT, AND REGISTRATION
  309. ===================================
  310.  
  311.    I'll get the easy part out of the way, first.  This program is
  312.    freeware.  Use it in good health.  Fercrissakes, this is just
  313.    a stupid tagline generator! Take that registration money and
  314.    spend it on something worthwhile, like your sweetheart!
  315.  
  316.  
  317.  
  318.    OK, the odds of this program being bug-free are pretty slim.
  319.    As such, I very much want to hear of any bugs you come across.
  320.    If you do, please let me know about the version of the OS you
  321.    use, the CPU and memory in your computer, and whether you're
  322.    using a hard drive for this.  Also, open a shell, and CD to
  323.    the directory that ASTG lives in.  Type "VERSION ASTG FULL"
  324.    and record the information you get and pass that along.  Be
  325.    prepared to somehow get your tagline file to me, too, as it
  326.    may be something in your tagline file that's doing it (but
  327.    don't send it unless I ask for it!).  Finally, ASTG will
  328.    report an error code when it fails.  Please let me know what
  329.    code that is, as it will point me to the exact location in the
  330.    code of the failure.  If you're up to it, try to reproduce the
  331.    failure and see if it fails in the same place.
  332.  
  333.    You can contact me on FidoNet as:
  334.  
  335.       Jeff Grimmett at 1:202/720 (not crashable)
  336.  
  337.    ... or on Internet as:
  338.  
  339.       jgrimm@sdd.hp.com
  340.  
  341.    ... or on GENie as:
  342.  
  343.       J.Grimmett2
  344.  
  345.    You can contact me via SnailMail as:
  346.  
  347.       Jeff Grimmett
  348.       3152 Kemper St #5
  349.       San Diego, CA
  350.                   92110
  351.  
  352. Future Plans
  353. ============
  354.  
  355.    The few items I have left:
  356.  
  357.    o  Implement keyboard support for the prefs program (not that
  358.       there's much to implement...)
  359.  
  360.    o  Remove final dependencies on ReqTools.library in the prefs
  361.       program.
  362.  
  363.    Not much left to do!
  364.  
  365.  
  366. ACKS!
  367. =====
  368.  
  369.    I'd like to thank my beta testers, Holly Sullivan, Joyce
  370.    Divina, and Gary Peake.  Oh, and Asha Develder, as well :-)
  371.  
  372.    ASTG Prefs was built using GadToolsBox, sadly no longer
  373.    supported by the author.  :-(
  374.  
  375.    ASTG and ASTG Prefs were built using SAS/C 6.3, a wonderful
  376.    development system on any platform!
  377.  
  378.    Thanks to Oxxi for TurboText, which was used for both the code
  379.    editing and for document generation :-)
  380.  
  381.    Thanks to the various offline reader and point software
  382.    authors for making thier products useable even unregistered.
  383.    If it weren't for that, if would be darned difficult to test
  384.    ASTG under varying conditions.
  385.  
  386.  
  387. History File
  388. ============
  389.  
  390.    Version 1.8    (15 April 1995) (Happy Easter, Asha!)
  391.  
  392. o  Removed the backup code in ASTG.  It was creating more
  393.    problems than it was worth.  Users would run ASTG after ASTG
  394.    bombed out, and the empty file would be backed up, destroying
  395.    the good file.  Since no one (including myself) was benefiting
  396.    from the backup option, I took it out to save space.
  397.  
  398. o  ASTG got rewritten from the ground up.  This was due to the
  399.    fact that although ASTG was running flawelessly on countless
  400.    systems, it was still crashing on Asha's machine.  This is not
  401.    good, since it is Asha's program!  ALL SAS/C str* string
  402.    functions were removed or my own code was substituted.  ASTG
  403.    is slightly slower, but now seems to be running stable on
  404.    Asha's machine.  As a side effect, the code is around 2K
  405.    smaller.
  406.  
  407.    Version 1.7    ( 2 April 1995)   *BETA*
  408.  
  409.       ASTG would crash horribly if the tagline file was 0 bytes
  410.       long.  Code has been added to exit gracefully if that happens.
  411.       If you see this error, it is probably because ASTG bombed out
  412.       in an earlier run.
  413.  
  414.       Implemented the PARANOID MODE of programming ASTG.  This means
  415.       that ASTG error checks practically everything it does and
  416.       fails if anything is remiss, but it prints an error code when
  417.       it does so.  This should facilitate troubleshooting of bugs
  418.       that I cannot reproduce here.
  419.  
  420.       As part of the PARANOID philosophy, I have implemented a
  421.       backup mode in ASTG.  Before it touches your tagline file, it
  422.       copies the file to the same directory with the ".bk" suffix.
  423.  
  424.       Removed, for philosophical reasons, all dependencies in ASTG
  425.       itself on ReqTools.  The dependencies still exist in ASTG
  426.       Prefs.  One thing at a time, ambassador, one thing at a time.
  427.  
  428.    Version 1.6    (19 March 1995)
  429.  
  430.       Rewrote the Prefs File editor and the prefs file portion of
  431.       ASTG.  You MUST delete the old ENV:ASTG.Prefs and rerun the
  432.       prefs program.  Sorry!
  433.  
  434.    Version 1.5
  435.  
  436.       A radical departure from 1.3 and 1.4, it was actually found to
  437.       be SLOWER than the older ones.  As such, it was scrapped.
  438.  
  439.    Version 1.4    (13 March 1995)
  440.  
  441.       Changed "cleanup" function to utilize a faster method of
  442.       writing out the tagline file when it's cleaning out the
  443.       "*"'s.  I don't think there's anything else that can be
  444.       done to increase the speed of ASTG now.
  445.  
  446.       Removed all references to ANY "printf" related functions
  447.       (fprintf, sprintf), which reduced the code size by 4K or
  448.       thereabouts.
  449.  
  450.       Yet another speed increase -- this time, on the file
  451.       write-back.  Changed it from line I/O to buffered I/O.
  452.       Unfortunately, it does not appear that this is possible for
  453.       the "clean-up" operation.
  454.  
  455.       Found and stomped one more bug, this one introduced in 1.3.
  456.       The memory buffer used to store the tagline selected was
  457.       exactly one byte too large.  Thus, a garbage character was
  458.       being tacked on to the end of each tagline in the tagline
  459.       file.
  460.  
  461.    Version 1.3    (14 Feb 1995) (Happy Valentine's day, Asha!)
  462.  
  463.       Nailed it!  Well, I think so...
  464.  
  465.       For the technically oriented, strtok() is a little brain
  466.       dead and tends to overflow if you tell it to parse a string
  467.       for "\n" and it doesn't find it.  I fixed this by
  468.       calloc()-ing a chunk of memory one byte larger than the
  469.       tagline file, and strset()-ing it to "\n", thus
  470.       guaranteeing that there is a CR at the end of the last line
  471.       parsed.
  472.  
  473.       Side effect: the first time you use it, ASTG causes the
  474.       tagline file to grow by one byte.  At this time, I am not
  475.       certain if this will cause any ill effects, but time will
  476.       tell.
  477.  
  478.       There is no indication as to the cause of the failure of
  479.       ASTG to parse the bragline setting.  I am assuming at this
  480.       time that it was a side-effect of the memory grunging
  481.       happening due to the tagline corruption problem.  Only time
  482.       will tell.
  483.  
  484.    Version 1.2    ( 9 Feb 1995)
  485.  
  486.       Internal release.
  487.  
  488.       There are two known bugs in ASTG.  One causes it to not
  489.       properly parse the bragline on/off switch.  The other is
  490.       more major, and causes it to occasionally corrupt the
  491.       tagline file. In many cases, ASTG hangs up because of it.
  492.  
  493.       Major changes made to speed the execution of the program.
  494.       This has caused the bug that corrupts the tagline file to
  495.       stand up and be really noticable, which makes it easier to
  496.       troubleshoot.  It goes without saying that ASTG will not be
  497.       released in this condition.
  498.  
  499.       One side effect of the change is that the "###" is no
  500.       longer needed at the end of the tagline file.  In fact, if
  501.       it is left in, it will eventually be seen as a tagline! :-)
  502.  
  503.       Another side effect is that the number of taglines you have
  504.       is now limited only by how much memory you have.
  505.  
  506.    Version 1.1    ( 3 Jan 1995)
  507.  
  508.       Several changes made to increase the execution speed. I am
  509.       still not altogether satisfied with the speed, but it now
  510.       takes 1/5 the time it took version 1.0 to execute on the
  511.       same sized tagline file, so that's some progress! :-)  All
  512.       speed changes were accomplished by inlining several
  513.       functions within the program.
  514.  
  515.       Added an extra <CR> before the tagline, at Asha's request.
  516.       Hey, it's HER birthday present! :-)
  517.  
  518.       Trimmed out a lot of excessive junk (debugging code, catch
  519.       code, stdio code, etc) to reduce the size of the program by
  520.       25%.
  521.  
  522.    Version 1.0    ( 9 Dec 1994) (Happy Birthday, Asha!)
  523.  
  524.       First C release, beta only. No smoke! :-)
  525.  
  526.  
  527.